import globals from 'globals';
import pluginJs from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import autoImport from './.eslintrc-auto-import.js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

/** @type {import('eslint').Linter.Config[]} */
export default [
  {
    ignores: ['dist/**', 'node_modules/**', 'public/**']
  },
  { files: ['**/*.{js,mjs,cjs,vue}'] },
  {
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
        ...autoImport.globals,
        IconEpFold: 'readonly',
        IconEpExpand: 'readonly',
        IconEpHouse: 'readonly',
        ElIcon: 'readonly',
        IconEpPlus: 'readonly',
        ElMessageBox: 'readonly',
        ElNotification: 'readonly',
        ElMessage: 'readonly',
        IconEpOdometer: 'readonly'
      }
    }
  },

  pluginJs.configs.recommended,
  ...pluginVue.configs['flat/essential'],
  {
    rules: {
      'vue/multi-word-component-names': 'off'
    }
  },
  eslintPluginPrettierRecommended
];
